﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PartyRepresentativeMeetingEdit.aspx.cs" Inherits="ZHDJ.BranchCenter.Module.PartyRepresentative.PartyRepresentativeMeetingEdit" %>


<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
    <style>
        .fontred {
            color: red;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" style="background-color: #0000FF" onsubmit="return UESync();">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server">
            <Items>

                <f:Form BodyPadding="10px" ID="Form2"
                    runat="server" Title="" ShowBorder="false" ShowHeader="false">
                    <Rows>
                        <f:FormRow>
                            <Items>

                                <f:TextBox ID="txtTitle" runat="server" LabelAlign="right" Label="主题" Required="true"
                                    ShowRedStar="true" RequiredMessage="请填写主题">
                                </f:TextBox>
                            </Items>
                        </f:FormRow>
                        <f:FormRow>
                            <Items>

                                <f:DropDownList ID="ddlStudio" EmptyText="请选择党代表工作室" Label="党代表工作室" Required="true"  ShowRedStar="true" LabelAlign="right" runat="server">
                                </f:DropDownList>
                            </Items>
                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:TriggerBox ID="dtBeginDate" Required="true"  LabelAlign="right" ShowRedStar="True" Label="开始时间" EmptyText="请选择开始时间" TriggerIcon="Date"
                                    runat="server">
                                </f:TriggerBox>
                                <f:TriggerBox ID="dtEndDate" Required="true"  LabelAlign="right" ShowRedStar="True" Label="结束时间" EmptyText="请选择结束时间" TriggerIcon="Date"
                                    runat="server">
                                </f:TriggerBox>
                            </Items>
                        </f:FormRow>
                       
                        <f:FormRow>
                            <Items>
                                 <f:CheckBoxList runat="server"  ID="cblJoinRepresentative" ColumnNumber="5" 
                                      DataTextField="UserName" DataValueField="ID" 
                                     Label="接访党代表" LabelAlign="right"></f:CheckBoxList>
                       
                            </Items>
                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:TextBox ID="txtAddress" runat="server" LabelAlign="right" Label="地址">
                                </f:TextBox>
                            </Items>
                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:CheckBox ID="cbxEnabled" runat="server" Label="是否发布" LabelAlign="right">
                                </f:CheckBox>
                                <f:TextBox ID="TextBox1" runat="server"  Hidden="true">
                                </f:TextBox>
                            </Items>
                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
                                    <script type="text/plain" id="editor"></script>
                                </f:ContentPanel>
                            </Items>
                        </f:FormRow>
                    </Rows>
                </f:Form>

            </Items>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="Form2" Icon="SystemSaveClose"
                            OnClick="btnSaveClose_Click" runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>


    </form>
</body>
</html>

<script src="../../../../Resource/js/default/jquery.min.js"></script>
<script src="../../../../Resource/js/My97DatePicker/WdatePicker.js"></script>
<script src="../../../../Resource/ueditor/ueditor.config.js"></script>
<script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
    var dtBeginDateClientID = '<%= dtBeginDate.ClientID %>';
    var dtEndDateClientID = '<%= dtEndDate.ClientID %>';
    F.ready(function () {
        var now = new Date();
        
        var dtBeginDate = F(dtBeginDateClientID);

        dtBeginDate.onTriggerClick = function () {
            WdatePicker({
                el: dtBeginDateClientID + '-inputEl',
                dateFmt: 'yyyy-MM-dd HH:mm',
                onpicked: function () {
                    // 确认选择后，执行触发器输入框的客户端验证
                    dtBeginDate.validate();
                }
            });
        };
        var dtEndDate = F(dtEndDateClientID);

        dtEndDate.onTriggerClick = function () {
            WdatePicker({
                el: dtEndDateClientID + '-inputEl',
                dateFmt: 'yyyy-MM-dd HH:mm',
                onpicked: function () {
                    // 确认选择后，执行触发器输入框的客户端验证
                    dtEndDate.validate();
                }
                //,
                //minDate: '#F{$dp.$D(\'' + dtBeginDateClientID + '\')}',
                //maxDate: '2099-10-01'
            });
        };
    });


    var editor;
    var editorContent = '<%=EditorContent%>';
    var containerClientID = '<%= ContentPanel1.ClientID %>';
    F.ready(function () {
        editor = UE.getEditor("editor", {
            initialFrameWidth: '100%',
            initialFrameHeight: '180',
            enableAutoSave: false,
            saveInterval: 1000000,
            elementPathEnabled: false,
            autoHeightEnabled: false,
            onready: function () {
                // 重新布局外部容器
                F(containerClientID).updateLayout();
            }
        });

        editor.ready(function () {
            if (editorContent) {
                editor.setContent(editorContent);
            }
        });
    });

    function UESync() {
        var editor = UE.getEditor('editor')
        editor.sync();
        return true;
    }
</script>
